package com.javaee.ejb.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the activity database table.
 * 
 */
@Entity
@Table(name="activity")
@NamedQueries(
{
	@NamedQuery(name = "FindAllActivities", query = "SELECT OBJECT (ac) FROM Activity ac WHERE ac.employeeIdemployee=:p_IdEmployee"),
    @NamedQuery(name = "FindActivityByProject", query = "SELECT OBJECT (ac) FROM Activity ac WHERE ac.projectIdproject = :p_IdProject AND ac.employeeIdemployee=:p_IdEmployee"),
    @NamedQuery(name = "FindProjectActivities", query = "SELECT OBJECT (ac) FROM Activity ac WHERE ac.projectIdproject = :p_IdProject"),
    @NamedQuery(name = "FindActivityById", query = "SELECT OBJECT (ac) FROM Activity ac WHERE ac.idactivity = :p_IdActivity")

})
public class Activity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int idactivity;

	private int charge;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="day_act")
	private Date dayAct;

	private String description;

	@Column(name="employee_idemployee")
	private int employeeIdemployee;

	@Column(name="project_idproject")
	private int projectIdproject;

    public Activity() {
    }

	public int getIdactivity() {
		return this.idactivity;
	}

	public void setIdactivity(int idactivity) {
		this.idactivity = idactivity;
	}

	public int getCharge() {
		return this.charge;
	}

	public void setCharge(int charge) {
		this.charge = charge;
	}

	public Date getDayAct() {
		return this.dayAct;
	}

	public void setDayAct(Date dayAct) {
		this.dayAct = dayAct;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getEmployeeIdemployee() {
		return this.employeeIdemployee;
	}

	public void setEmployeeIdemployee(int employeeIdemployee) {
		this.employeeIdemployee = employeeIdemployee;
	}

	public int getProjectIdproject() {
		return this.projectIdproject;
	}

	public void setProjectIdproject(int projectIdproject) {
		this.projectIdproject = projectIdproject;
	}

}